home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AOL File Library: 2,801 to 2,900
/
aol-file-protocol-4400-2801-to-2900.zip
/
AOLDLs
/
C++ Files Library
/
Acere (PowerPlant, Game) 1.2
/
AcereÄ.sit
/
Acereƒ
/
Code
/
CardWell.h
< prev
next >
Wrap
Text File
|
1995-02-15
|
3KB
|
100 lines
// ===========================================================================
// LPane.h ⌐1993 Metrowerks Inc. All rights reserved.
// ===========================================================================
#pragma once
#include <LAttachable.h>
#include <Balloons.h>
#ifndef __EVENTS__
#include <Events.h>
#endif
#include <LView.h>
class LStream;
#ifndef __DRAG__
#include <Drag.h>
#endif
#include "CardDeck.h"
#include <LCommander.h>
#include <LDragAndDrop.h>
#if defined(powerc) || defined(__powerc)
#pragma options align=reset
#endif
const short kNoCard = -1;
const Int32 cCardWellType = 'Card'; // Usable as a FlavorType or an OSType
class CardWell : public LPane/*, public LCommander, public LDragAndDrop */
{
public:
// CardStruct itsCard;
PlayingCard *itsCard;
Boolean cardCanMove, isHighlighted;
RgnHandle itsCardRgn;
HMMessageRecord theWellHelp;
Rect itsHelpRect;
static CardWell* CreateCardWell(LStream *inStream);
CardWell();
CardWell(const CardWell &inOriginal);
CardWell(const SPaneInfo &inPaneInfo);
CardWell(LStream *inStream);
// virtual void InitPane(const SPaneInfo &inPaneInfo);
virtual void InitCard(void);
virtual ~CardWell();
// Ñ Drawing
virtual void Draw(RgnHandle inSuperDrawRgnH);
virtual void DrawSelf();
virtual RgnHandle GetCardRegion(void);
virtual Boolean CanRemove(void);
virtual Boolean PointInDropArea(Point inGlobalPt);
virtual Boolean ItemIsAcceptable(DragReference inDragRef, ItemReference inItemRef);
/* virtual void EnterDropArea(DragReference inDragRef, Boolean inDragHasLeftSender);
virtual void LeaveDropArea (DragReference inDragRef);
virtual void InsideDropArea (DragReference inDragRef);
virtual void ReceiveDragItem(DragReference inDragRef,
DragAttributes inDragAttrs,
ItemReference inItemRef,
Rect &inItemBounds); // In Local coordinates
virtual Boolean CheckForOptionKey(DragReference inDragRef);
virtual Boolean CheckIfViewIsAlsoSender(DragReference inDragRef);
*/
virtual Boolean CanDrop(PlayingCard *draggedCard);
virtual Boolean CanDropOnEmptySlot(PlayingCard *draggedCard);
virtual Boolean CanDropOnSlot(PlayingCard *draggedCard);
virtual void AddCardToWell(CardWell *whichWell, PlayingCard *whichCard);
virtual void RemoveCardFromWell(CardWell *whichWell, PlayingCard *whichCard);
// virtual void ClickSelf(const SMouseDownEvent &inMouseDown);
virtual void Click(SMouseDownEvent &inMouseDown);
// virtual void FillDataStruct(CardStruct *theStruct);
private:
void CreateDragEvent (const SMouseDownEvent &inMouseDown);
};
void CopyPString(ConstStr255Param srcString, Str255 destString);